package demo1;

class Course {
    private String courseID;
    private String courseName;
    private double credit;
    private String introduction;

    public Course(String courseID, String courseName, double credit) {
        this.courseID = courseID;
        this.courseName = courseName;
        this.credit = credit;
        this.introduction = "本课程是计算机类专业的一门专业基础课....";
    }

    public Course() {
        this.courseID = "CC2002";
        this.courseName = "Java程序设计基础";
        this.credit = 4.0;
        this.introduction = "本课程是计算机科学与技术专业的一门专业基础课....";
    }

    public String getCourseID() {
        return courseID;
    }

    public void setCourseID(String courseID) {
        this.courseID = courseID;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public double getCredit() {
        return credit;
    }

    public void setCredit(double credit) {
        this.credit = credit;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public void print() {
        System.out.println("课程代码："+this.courseID);
        System.out.println("课程名称："+this.courseName);
        System.out.println("课程学分："+this.credit);
        System.out.println("课程简介："+this.introduction);
        System.out.println();
    }
}
public class CourseDemo {
    public static void main(String[] args) {
        Course Java = new Course();
        Course DataBase = new Course("CC2007","数据库系统",4.0);
        Java.print();
        DataBase.print();
    }
}
